<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="http://localhost/YouHuoShop/Static/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="http://localhost/YouHuoShop/Static/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="http://localhost/YouHuoShop/Static/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="http://localhost/YouHuoShop/Static/Admin/Flat/img/favicon.ico">
	    <style type="text/css">
		    .table .price{
		    	padding:0px;
		    }
	    	.price p{
	    		margin:0px;padding:0px;
	    		font-size:12px;
	    	}
	    	.price p span{
	    		text-decoration: line-through;
	    	}
	    </style>
	</head>
	<body>
		<table class="table table-hover">
			<tr class="active">
			  <th>商品ID</th>
			  <th>商品名称</th>
			  <th>价格</th>
			  <th>库存</th>
			  <th>点击次数</th>
			  <th>添加时间</th>
			  <th width="210">操作</th>
			</tr>
			<?php foreach ($goodsData as $k=>$g){?>
				<tr>
					<td><?php echo $g['gid'];?></td>
					<td><?php echo $g['gname'];?></td>
					<td class="price">
						<p>市场价：<span><?php echo $g['market_price'];?></span></p>
						<p>商城价：<?php echo $g['shop_price'];?></p>
					</td>
					<td><?php echo $g['store'];?></td>
					<td><?php echo $g['click_num'];?></td>
					<td><?php echo date('Y-m-d',$g['put_on_time']);?></td>
					<td>
						<a href="<?php echo U('GoodsList/index',array('gid'=>$g['gid']));?>" class="btn btn-sm btn-primary">货品列表</a>
						<a href="<?php echo U('editGoods',array('gid'=>$g['gid']));?>" class="btn btn-sm btn-warning">修改</a>
						<a href="<?php echo U('del',array('gid'=>$g['gid']));?>" class="btn btn-sm btn-danger">删除</a>
					</td>
				</tr>
			<?php }?>
		</table>
	</body>
</html>
